package hdpdhl.com.czxy.hdpdhl;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

/**
 * Created by Administrator on 2018\6\17 0017.
 */

public class ContentFragment extends Fragment {
    private int[] bgRes = {R.drawable.a, R.drawable.b,R.drawable.c,R.drawable.d,R.drawable.f};
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_content,null);
        RelativeLayout rl = (RelativeLayout)view.findViewById(R.id.rl);

        int index = getArguments().getInt("index");
        rl.setBackgroundResource(bgRes[index]);
        return view;
    }
}
